package com.cruise.common.web.result;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author haoxr
 * @date 2020-06-23
 **/
@AllArgsConstructor
@NoArgsConstructor
public enum ResultCode implements IResultCode, Serializable {

    /**
     *
     */
    SUCCESS("00000","一切ok"),

    /**
     * 用户名或密码错误
     */
    USERNAME_OR_PASSWORD_WRONG("A0211","用户名或密码错误"),

    /**
     *
     */
    CLIENT_AUTHENTICATION_FAILED("A0212","客户端认证失败"),
    /**
     *
     */
    TOKEN_INVALID_OR_EXPIRED("A0230","token无效或已过期"),
    /**
     *
     */
    USER_ACCESS_UNAUTHORIZED ("A0301","访问未授权"),

    /**
     *
     */
    SYSTEM_EXECUTION_ERROR("B0001","系统执行出错"),

    /**
     *
     */
    BODY_NOT_MATCH("B0002","请求的数据格式不符!"),

    /**
     *
     * @return
     */
    USER_ACCOUNT_LOCKED("A0270","该账号已被锁定!"),
    /**
     *
     * @return
     */
    USER_ACCOUNT_DISABLED("A0271","该账户已被禁用!"),
    /**
     *
     * @return
     */
    USER_ACCOUNT_EXPIRED("A0272","该账号已过期!");


    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    private String code;

    private String msg;
}
